<template>
  <h1>El-单选组件</h1>
  <el-radio-group v-model="edu">
    <el-radio value="初中" label="初中"></el-radio>
    <el-radio value="高中" label="高中"></el-radio>
    <el-radio value="大学">大学</el-radio>
    <el-radio value="硕士">硕士</el-radio>
  </el-radio-group>
  <h4>学历：{{edu}}</h4>
  <hr>
  <el-radio-group v-model="price">
    <el-radio  v-for="product in products" :label="product.title" :value="product.price"></el-radio>
  </el-radio-group>
  <h4>选择酒的价格：{{price}}</h4>
</template>

<script setup>
import {ref} from "vue";
const edu = ref('');

const products = ref([
  {title:'五粮液',price:'500'},
  {title:'茅台',price:'2500'},
  {title:'梦之蓝',price:'368'},
  {title:'汾酒',price:'330'},
])
const price = ref('2500');
</script>


<style scoped>

</style>